<?php
ob_start(); 
@session_start();
//$username = get_session_cookies($getsessioncookie);
//echo $username;
if(isset($_SESSION["$getsessioncookie"])||isset($_COOKIE["$getsessioncookie"])){
   if(isset($_SESSION["$getsessioncookie"])){
       ShowLoginInfo($_SESSION["$getsessioncookie"],'nguyendo_login_top');
	
	}else if(isset($_COOKIE["$getsessioncookie"])){
        ShowLoginInfo($_COOKIE["$getsessioncookie"],'nguyendo_login_top');
    }  
}
//===============================================================================================================================================================
//Function show Hello: username
//(name cookiesor session, id div for css design)
function ShowLoginInfo($sessioncookie, $id){?>
    <div id="<?php echo $id;?>">
        <form action="../logout.php" method="post" onsubmit="return check_logout();" name="logout">
            <div class="login">
                <?php  echo HELLO_LOGIN.'<em class="hello">'.$sessioncookie.'</em>';?>
                <input type="hidden" name="logout_sys"/>
                <input id="logout_sys" type="submit" value="<?php  echo LOGOUT_LOGIN;?>" />
            </div>
        </form>
    </div>
<?php
}?>
<img src="../images/logo_developer.png" width="80" height="70" />
<em class="title_admin"><?php echo TITLE_ADMIN;?></em>

<script>
 function check_logout(){
	var hoi=confirm("<?php echo LOGOUT_QUESTION;?>");
	if(hoi==true) return true;
	else return false;
} 
</script>
